import { computed, ref } from 'vue'

export const useState = () => {
    const count = ref(0)

    const doubleCount = computed(() => count.value*2)
    const increment = () => {
        count.value += 1
    }

    return {
        count,
        doubleCount,
        increment
    }
}